#ifndef _PPPOE_SERVER_H_
#define _PPPOE_SERVER_H_

#include <net/if.h>
#include <net/ethernet.h>
#include <time.h>
//#include "libevent/event.h"

#define SMALL_BUF_SIZE 128
#define DEFAULT_PPPOE_SERVER_OPTIONS "/etc/ppp/pppoe_server_options"
#define NSS_PLUS_SSO 65534
#define IPV4_ALEN 4

#define control_exit() (void)0

#define MAX_INTERFACES 32
#define DEFAULT_INTERFACE "eth0"
typedef struct Interface {
    char name[IFNAMSIZ + 1];
    int  sock;
    unsigned char maca[ETH_ALEN + 1];
    //EventHandler *eh;
} Interface;

#define DEFAULT_MAX_SESSIONS 32
typedef struct Session {
    PppoeSessionFunctionTable *func;
    pit_t pid;
    Interface *eth_if;
    unsigned char local_ip[IPV4_ALEN];
    unsigned char peer_ip[IPV4_ALEN];
    unsigned int sid;
    unsigned char mac[ETH_ALEN];            // peer's ethernet address
    unsigned int flags;                     // TO-DO
    time_t start_time;
    char const *service_name;               // TO-DO
    struct Session *next;
} Session;
#endif
